package nodes.statements.controlflow;

import nodes.body.BodyNode;
import nodes.exprnodes.ExprNode;
import visitors.Visitor;

public final class IfNode extends ControlFlowNode
{
    public BodyNode elseBody;

    public IfNode(ExprNode expr, BodyNode body, BodyNode elseBody)
    {
        this.expr = expr;
        this.body = body;
        this.elseBody = elseBody;
    }

    @Override
    public Object accept(Visitor v)
    {
        return v.visit(this);
    }
}